<template>
    <div class="flex-center-center my-footer">
        <div class="my-footer-item">
            <router-link
                to="/"
                :class="{'active': route.path === '/' || route.path.endsWith(`/${$locale.value}/`) || route.path.endsWith(`/${$locale.value}`)}"
            >
                <i class="diff-icon-quotes fz24" />
            </router-link>
        </div>

        <div class="my-footer-item">
            <router-link
                to="/chat"
                :class="{'active': route.path.endsWith('/chat')}"
            >
                <i class="diff-icon-chat fz24" />
            </router-link>
        </div>

        <div class="my-footer-item">
            <router-link
                to="/otc"
                :class="{'active': route.path.endsWith('/otc')}"
            >
                <i class="diff-icon-otc fz24" />
            </router-link>
        </div>

        <div class="my-footer-item">
            <router-link
                to="/calc"
                :class="{'active': route.path.endsWith('/calc')}"
            >
                <i class="diff-icon-calc fz24" />
            </router-link>
        </div>
    </div>
</template>

<script setup>
const route = useRoute();
</script>

<style lang="scss" scoped>
.my-footer {
    box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.15);
    height: 58px;

    a {
        color: #afb4b9;
        padding: 5px;
    }

    .my-footer-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 12px;
        gap: 5px;
        line-height: 1;

        .active {
            @extend %text-primary;
        }
    }
}
</style>
